﻿namespace Hotel.Web.Controllers
{
    using System.Web.Mvc;

    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// russian flag in upper-right corner clicked
        /// </summary>
        /// <returns></returns>
        public ActionResult LangRU()
        {
            var lang = "ru-ru";
            Hotel.Web.Helpers.CookieUtil.SetCookieValue("lang", lang, 1000000);
            return Redirect(Request.UrlReferrer.ToString());
        }

        /// <summary>
        /// american flag in upper-right corner clicked
        /// </summary>
        /// <returns></returns>
        public ActionResult LangEN()
        {
            var lang = "en-us";
            Hotel.Web.Helpers.CookieUtil.SetCookieValue("lang", lang, 1000000);
            return Redirect(Request.UrlReferrer.ToString());
        }


        public ActionResult About()
        {
            return View();
        }
    }
}
